﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Nodes;
using System.Threading.Tasks;

namespace Magic.System;

public class ConfigListOutPut
{
    public JObject ConfigGroup { get; set; }
    public Dictionary<string,dynamic> List { get; set; }
    public JArray QuickEntrance { get;set; }
    public string Remark { get;set; }
}

public class CobfigOutputItem
{
    /// <summary>
    ///  
    ///</summary>
    public int Id { get; set; }
    /// <summary>
    /// 变量名 
    /// 默认值: 
    ///</summary>
    public string Name { get; set; }
    /// <summary>
    /// 分组 
    /// 默认值: 
    ///</summary>
    public string Group { get; set; }
    /// <summary>
    /// 变量标题 
    /// 默认值: 
    ///</summary>
    public string Title { get; set; }
    /// <summary>
    /// 变量描述 
    /// 默认值: 
    ///</summary>
    public string Tip { get; set; }
    /// <summary>
    /// 类型:string,number,radio,checkbox,switch,textarea,array,datetime,date,select,selects 
    /// 默认值: 
    ///</summary>
    public string Type { get; set; }
    /// <summary>
    /// 变量值 
    ///</summary>
    public JsonObject Value { get; set; }
    /// <summary>
    /// 字典数据 
    ///</summary>
    public string Content { get; set; }
    /// <summary>
    /// 验证规则 
    /// 默认值: 
    ///</summary>
    public string Rule { get; set; }
    /// <summary>
    /// 扩展属性 
    /// 默认值: 
    ///</summary>
    public string Extend { get; set; }
    /// <summary>
    /// 允许删除:0=否,1=是 
    /// 默认值: 0
    ///</summary>
    public byte AllowDel { get; set; }
    /// <summary>
    /// 权重 
    /// 默认值: 0
    ///</summary>
    public int Weigh { get; set; }
}

public class AddConfigInput {
    /// <summary>
    /// 变量名 
    /// 默认值: 
    ///</summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 分组 
    /// 默认值: 
    ///</summary>
    [Required]
    public string Group { get; set; }
    /// <summary>
    /// 变量标题 
    /// 默认值: 
    ///</summary>
    [Required]
    public string Title { get; set; }
    /// <summary>
    /// 变量描述 
    /// 默认值: 
    ///</summary>
    public string Tip { get; set; }
    /// <summary>
    /// 类型:string,number,radio,checkbox,switch,textarea,array,datetime,date,select,selects 
    /// 默认值: 
    ///</summary>
    [Required]
    public string Type { get; set; }
    /// <summary>
    /// 变量值 
    ///</summary>
    public string Value { get; set; }
    /// <summary>
    /// 字典数据 
    ///</summary>
    public string Content { get; set; }
    /// <summary>
    /// 验证规则 
    /// 默认值: 
    ///</summary>
    public dynamic Rule { get; set; }
    /// <summary>
    /// 扩展属性 
    /// 默认值: 
    ///</summary>
    public string Extend { get; set; }
}
